import { CommonForm } from '@/pages/OrderModule/common/components/CommonForm';
import { CommonModal } from '@/pages/OrderModule/common/components/CommonModal';
import CommonTextarea from '@/pages/OrderModule/common/components/CommonTextarea';
import SubTitle from '@/pages/OrderModule/common/components/SubTitle';
import Typography from '@/pages/OrderModule/common/components/Typography';
import { Alert, Form, Radio, Space } from 'antd';
import OrderAreaRadioGroup from '../../components/OrderAreaRadioGroup';
import OrderNumberCount from '../../components/OrderNumberCount';

/** 修改卖家备注 */
function SetOrderNothsModal(props) {
  const [form] = Form.useForm();
  function handleOk() {
    const val = form.getFieldsValue();
  }

  return (
    <CommonModal title={{ title: '修改卖家备注' }} open={true} width="600px" onOk={handleOk} onCancel={props.onCancel}>
      <Alert
        showIcon
        message={
          <Typography as="s1">
            1、卖家备注编辑后支持同步平台；
            <br />
            2、目前淘宝、京东、拼多多、抖音、快手、天猫供销平台支持同步。
          </Typography>
        }
        style={{ marginBottom: 16 }}
      />
      <CommonForm
        formProps={{
          form,
        }}
        columns={[
          {
            name: 'radio-group',
            slot: <OrderAreaRadioGroup />,
          },
          {
            block: (
              <>
                <OrderNumberCount
                  data={[
                    { label: '待审核', value: 9, type: 'warning' },
                    { label: '异常', value: 9, type: 'error' },
                    { label: '已发货', value: 9, type: 'success' },
                    { label: '已作废', value: 9, type: 'error' },
                  ]}
                />
                <SubTitle symbol as="s2" title="修改卖家备注" wrapStyle={{ margin: '16px 0' }} />
              </>
            ),
          },
          {
            name: 'radio-group1',
            slot: (
              <Radio.Group>
                <Space direction="vertical">
                  <Radio value="a">覆盖原有卖家备注</Radio>
                  <Radio value="a1">追加备注</Radio>
                  <Radio value="a2">清空已有的卖家备注</Radio>
                </Space>
              </Radio.Group>
            ),
          },
          {
            name: 'orderSn1',
            slot: <CommonTextarea showCount maxLength={100} placeholder="请输入卖家备注" rows={4} />,
          },
        ]}
      ></CommonForm>
      {/* <CommonLoading loading={loading} /> */}
    </CommonModal>
  );
}

export default SetOrderNothsModal;
